﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
        <meta http-equiv="cache-control" content="max-age=0" />
        <meta http-equiv="cache-control" content="no-cache" />
        <meta http-equiv="expires" content="0" />
        <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
        <meta http-equiv="pragma" content="no-cache" />
		<title>Combat Log</title>
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
        <style type="text/css">
            body
            {
                background-color:#333333;
            }
            #MainDiv
            {
                font-family: 'Segoe UI', Tahoma, Arial, Helvetica, Sans-Serif;
                font-size:9pt;
                white-space: nowrap;
                color: #e5eeff;
            }
            .TimeStamp
            {
                color: #8892aa;
            }
            .AttackOutAbilityName
            {
                color:#aa77ee;
                font-weight:bold;
            }
            .AttackInAbilityName
            {
                color:#dd77ee;
                font-weight:bold;
            }
            .HealAbilityName
            {
                color:#d2a7ed;
                font-weight:bold;
            }
            .AbilityName
            {
                color:#9955DD;
                font-weight:bold;
            }
            .HealAmount
            {
                color:#88FF77;
                font-weight:bold;
            }
            .DamageAmount
            {
                color:#FF0000;
                font-weight:bold;
            }
            .Mitigation
            {
                color:#FFAAAA;
            }
            .YouParty
            {
                color:#00AA00;
                font-weight:bold;
            }
            .OtherPartyPlayer
            {
                color:#ffdb60;
                font-weight:bold;
            }
            .OtherParty
            {
                color:#FF8800;
                font-weight:bold;
            }
            .Threat
            {
                color:#DDBB00;
            }
            .EffectName
            {
                color:#4488ff;
                font-weight:bold;
            }
            .NpcEffectName
            {
                color:#81e0ff;
                font-weight:bold;                
            }
            .EffectiveHealAmount
            {
                color:#77DD66;
            }
            .Resource
            {
                color:#999999;
                font-weight:bold; 
            }
            .CombatEvent
            {
                font-weight:bold;
                color:#ffffff;
            }
            #divLogo
            {
                margin: 20px;
                padding-bottom: 6px;
                border-bottom:solid 3px #5787b6;
                font-size:40px;
                color:#50504d;
            }
            #divStatus
            {
                position:fixed; 
                top:1px; 
                right:1px; 
                padding:10px; 
                background-color:White; 
                left:1px; 
                opacity:0.8; 
                filter:alpha(opacity=80);
                font-family:Arial;
                font-size: 20px;
                display:none;
                text-align:center;
                font-weight:bold;
                color:#444444;
            }
            #PopInfoDiv
            {
                position: absolute;
                z-index:999;
                padding:5px 7px 7px 7px;
                border:solid 1px #DDDDDD;
                background-color: #222222;
                font-size:15px;
                color: #e5eeff;
                border-radius: 4px;                
                font-family: 'Segoe UI', Tahoma, Arial, Helvetica, Sans-Serif;
                font-size:9pt;
                white-space: nowrap;
            }
            #PopInfoName
            {
                font-weight: bold;
            }
            #PopInfoId
            {
                margin-top:4px;
            }
        </style>
	</head>
	<body>
        <script type="text/javascript">
            function AddContent(newContent) {
                $(document).ready(function () {
                    var isScrolledToBottom = false;
                    //$("#divStatus").text("window.scrollTop=" + $(window).scrollTop() + " window.height=" + $(window).height() + " document.height=" + $(document).height());
                    if ($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
                        isScrolledToBottom = true;
                    }
                    $("#divLogo").remove();
                    if ($("#MainDiv").html().length == 0) {
                        $("#MainDiv").html(newContent);
                    }
                    else
                        $("#MainDiv").append(newContent);
                    if (isScrolledToBottom)
                        setTimeout(function () { $("html, body").scrollTop($(document).height()); }, 200);
                });
            }
            function SetContent(newContent) {
                //$("#divStatus").text("window.scrollTop=" + $(window).scrollTop() + " window.height=" + $(window).height() + " document.height=" + $(document).height());
                $(document).ready(function () {
                var $divStatus = $("#divStatus");
                $divStatus.text("Loading...");
                $divStatus.fadeIn("fast", function () {
                    $("#MainDiv").empty();
                    $("#MainDiv").html(newContent);
                    setTimeout(function () { $("html, body").scrollTop($(document).height()); }, 200);
                    });
                    $divStatus.fadeOut("fast");
                });
            }
            function ClearContent(newContent) {
                //$("#divStatus").text("window.scrollTop=" + $(window).scrollTop() + " window.height=" + $(window).height() + " document.height=" + $(document).height());
                $(document).ready(function () {
                    $("#MainDiv").empty();
                });
            }
            var HighlightsDone = false;
            function HighlightAll(text) {
                var $divStatus = $("#divStatus");
                $divStatus.text("Searching...");
                $divStatus.fadeIn("fast", function () {
                    if (HighlightsDone) {
                        HighlightsDone = false;
                        ClearHighlights();
                    }
                    if (window.find && window.getSelection) {
                        HighlightsDone = true;
                        document.designMode = "on";
                        var sel = window.getSelection();
                        sel.collapse(document.body, 0);

                        while (window.find(text)) {
                            document.execCommand("HiliteColor", false, "#FFFFAA");
                            document.execCommand("forecolor", false, "black");
                            sel.collapseToEnd();
                        }
                        document.designMode = "off";
                    }
                    FindFirst(text);
                    $divStatus.fadeOut("fast");
                });
            }
            function ClearHighlights() {
                $('#MainDiv *').each(function () {
                    var self = $(this);
                    if (self.css('background-color') != "rgba(0, 0, 0, 0)") {
                        self.css("background-color", "");
                    }
                    if (self.css('color') == "rgb(0, 0, 0)") {
                        self.css("color", "inherit");
                    }
                });
            }
            function FindFirst(text) {
                var sel = window.getSelection();
                sel.collapse(document.body, 0);
                window.find(text);
            }
            function FindNext(text) {
                window.find(text);
            }
            function FindPrev(text) {
                window.find(text, false, true);
            }
            function PopInfo(event, elem) {
                if (elem != null && elem.prop) {
                    $("#PopInfoDiv").remove();  
                    var itemstr = "<div id='PopInfoDiv'>";
                    itemstr += "<div id='PopInfoName'>";
                    itemstr += elem.text();
                    itemstr += "</div>";
                    itemstr += "<div id='PopInfoId'>";
                    itemstr += elem.data("tooltiptext");
                    itemstr += "</div>";
                    itemstr += "</div>";
                    $("body").append(itemstr);
                    var $divBigToolTip = $("#PopInfoDiv");
                    var left = elem.offset().left - 8;
                    var top = elem.offset().top - 6;
                    var color = elem.css("color");
                    $divBigToolTip.css("color", color);
                    $divBigToolTip.css("left", left);
                    $divBigToolTip.css("top", top);
                    $divBigToolTip.bind("mouseleave", function (event) {
                        clearTimeout(PoppingInfo);
                        $("#PopInfoDiv").remove();
                    });
                }
            }
            var PoppingInfo;
            $(document).ready(function () {
                var $mainDiv = $("#MainDiv");
                var popSelector = ".Popable";
                $mainDiv.delegate(popSelector, "mouseenter", function (event) {
                    var mouseEvent = event;
                    var $self = $(this);
                    PoppingInfo = setTimeout(function () { PopInfo(mouseEvent, $self); }, 750);
                });
                $mainDiv.delegate(popSelector, "mouseleave", function (event) {
                    clearTimeout(PoppingInfo);
                });
            });
        </script>
        <div id="MainDiv"><div id="divLogo">PARSEC</div></div>
        <div id="divStatus" class="StatusBar"></div>
	</body>
</html>